<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8" />
<title>统一异常处理</title>
</head>
<script src="http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script>
<body>
	<h1>Error Handler</h1>
	<div th:text="${url}"></div>
	<div th:text="${exception.message}"></div>
	<div id="testjson"></div>
	<script type="text/javascript">
		$.ajax({
			type : "post",
			url : "jsonerror",
			dataType : "json",
			success : function(data) {
				$("#testjson").text("");
				$("#testjson").text(data.message);
			},
			error : function(XMLHttpRequest, textStatus, errorThrown) {
				alert(errorThrown);
			}
		});
	</script>
</body>
</html>